<!-- 蓝色登录页面2 -->
<template>
	<view style="height:100vh;background: #fff;" class="container">
		<image src="../../../static/images/login-bg1.png" mode="widthFix" class="login-bg1 login-bg"></image>
		<image src="../../../static/images/login-bg2.png" mode="widthFix" class="login-bg2 login-bg"></image>
		<view class="login-view" style="">
			<view class="t-login">
				<view class="title">
					<image src="/static/images/login-logo.png" mode="widthFix"></image>
					<view class="t">
						xxx景区
					</view>
				</view>
				<form class="cl">
					<view class="t-a">
						<image src="../../../static/images/l-u.png" mode="widthFix"></image>
						<input type="number" name="phone" placeholder="请输入您的手机号" maxlength="11" v-model="phone" />
					</view>
					<view class="t-a">
						<image src="../../../static/images/l-p.png" mode="widthFix"></image>
						<input type="password" name="code" maxlength="18" placeholder="请输入您的密码" v-model="pwd" />
					</view>
					<button @tap="login()">登 录</button>
					<!-- <view class="reg" @tap="reg()">注 册</view> -->
					<view class="operas">
						<text @tap="admin()">工作人员</text>
						<text @tap="reg()">注册</text>
					</view>
				</form>
				<!-- <view class="t-f"><text>—————— 第三方账号登录 ——————</text></view>
				<view class="t-e cl">
					<view class="t-g" @tap="wxLogin()">
						<image src="https://zhoukaiwen.com/img/loginImg/wx.png"></image>
					</view>
					<view class="t-g" @tap="zfbLogin()">
						<image src="https://zhoukaiwen.com/img/loginImg/qq.png"></image>
					</view>
				</view> -->
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				phone: '', //手机号码
				pwd: '' //密码
			};
		},
		onLoad() {},
		methods: {
			//当前登录按钮操作
			login() {

				uni.reLaunch({
					url: '/pages/index/index'
				})
				var that = this;
				if (!that.phone) {
					uni.showToast({
						title: '请输入您的手机号',
						icon: 'none'
					});
					return;
				}
				if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(that.phone)) {
					uni.showToast({
						title: '请输入正确手机号',
						icon: 'none'
					});
					return;
				}
				if (!that.pwd) {
					uni.showToast({
						title: '请输入您的密码',
						icon: 'none'
					});
					return;
				}
				uni.showToast({
					title: '登录成功！',
					icon: 'none'
				});
			},
			//注册按钮点击
			reg() {
				// uni.navigateTo({
				// 	url: '/pages/login/register/register'
				// })
			},
			admin() {
				uni.navigateTo({
					url: "/pages/login/adminLogin/adminLogin"
				})
			},
			//等三方微信登录
			wxLogin() {
				uni.showToast({
					title: '微信登录',
					icon: 'none'
				});
			},
			//第三方支付宝登录
			zfbLogin() {
				uni.showToast({
					title: '支付宝登录',
					icon: 'none'
				});
			}
		}
	};
</script>
<style lang="scss">
	.container {
		.login-bg {
			position: fixed;
		}

		.login-bg1 {
			top: 0;
			right: 0;
			width: 40%;
		}

		.login-bg2 {
			bottom: 0;
			left: 0;
			width: 40%;
		}
	}

	.txt {
		font-size: 32rpx;
		font-weight: bold;
		color: #333333;
	}



	.reg {
		font-size: 28rpx;
		color: #fff;
		height: 90rpx;
		line-height: 90rpx;
		border-radius: 50rpx;
		font-weight: bold;
		background: #f5f6fa;
		color: #000000;
		text-align: center;
		margin-top: 30rpx;
	}

	.login-view {
		width: 100%;
		position: relative;
		margin-top: 320rpx;
		border-radius: 8% 8% 0% 0;
	}

	.t-login {
		width: 600rpx;
		margin: 0 auto;
		font-size: 28rpx;
		padding-top: 80rpx;

		.title {
			display: flex;
			flex-direction: column;
			align-items: center;

			image {
				width: 160upx;
			}

			.t {
				font-size: 42upx;
				margin-top: 22upx;
				margin-bottom: 30upx;
			}
		}
	}

	.t-login button {
		font-size: 28rpx;
		background: #2796f2;
		color: #fff;
		height: 90rpx;
		line-height: 90rpx;
		border-radius: 50rpx;
		font-weight: bold;
	}

	.t-login input {
		height: 90rpx;
		line-height: 90rpx;
		font-size: 28rpx;
	}

	.t-login .t-a {
		position: relative;
	}

	.t-b {
		text-align: left;
		font-size: 42rpx;
		color: #ffffff;
		padding: 130rpx 0 0 70rpx;
		font-weight: bold;
		line-height: 70rpx;
	}

	.t-login .t-c {
		position: absolute;
		right: 22rpx;
		top: 22rpx;
		background: #5677fc;
		color: #fff;
		font-size: 24rpx;
		border-radius: 50rpx;
		height: 50rpx;
		line-height: 50rpx;
		padding: 0 25rpx;
	}

	.t-login .t-d {
		text-align: center;
		color: #999;
		margin: 80rpx 0;
	}

	.t-login .t-e {
		text-align: center;
		width: 250rpx;
		margin: 80rpx auto 0;
	}

	.t-login .t-g {
		float: left;
		width: 50%;
	}

	.t-login .t-e image {
		width: 50rpx;
		height: 50rpx;
	}

	.t-login .t-f {
		text-align: center;
		margin: 150rpx 0 0 0;
		color: #666;
	}

	.t-login .t-f text {
		margin-left: 20rpx;
		color: #aaaaaa;
		font-size: 27rpx;
	}

	.t-login .uni-input-placeholder {
		color: #aeaeae;
	}

	.cl {
		zoom: 1;

		.t-a {
			display: flex;
			align-items: center;
			border-bottom: 1px solid #e9e9e9;
			padding: 16upx 0;

			image {
				width: 40upx;
				margin-right: 12upx;
			}
		}

		button {
			margin-top: 22upx;
		}

		.operas {
			display: flex;
			align-items: center;
			margin-top: 22upx;
			justify-content: center;

			text {
				width: 50%;
				text-align: center;

				&:first-child {
					color: $uni-color-bg-z;
				}
			}
		}
	}

	.cl:after {
		clear: both;
		display: block;
		visibility: hidden;
		height: 0;
		content: '\20';
	}
</style>
